import Vue from 'vue'
import VueRouter from 'vue-router'


Vue.use(VueRouter)

const routes = [
  {
    // 登录
    path: "/login",
    meta: {
      hidden: true
    },
    component: () => import('../views/login.vue')
  },
  {
    path: "/",
    component: () => import('../components/Layout.vue'),
    meta: {
      title: "首页",
      icon: require('../assets/home.png'),
      iconSel: require('../assets/home(1).png'),
    },
    children: [
      {
        path: "home",
        component: () => import('../views/home.vue'),
      }
    ]
  },
  {
    path: "/",
    component: () => import('../components/Layout.vue'),
    children: [
      {
        path: "videos",
        component: () => import('../views/videos.vue'),
      }
    ],
    meta: {
      title: "视频",
      icon: require('../assets/videos.png'),
      iconSel: require('../assets/videos (1).png'),
    }
  },
  {
    path: "/",
    component: () => import('../components/Layout.vue'),
    children: [
      {
        path: "comment",
        component: () => import('../views/comment.vue'),
      }
    ],
    meta: {
      title: "留言",
      icon: require('../assets/comment.png'),
      iconSel: require('../assets/comment (1).png'),
    }
  },
  {
    path: "/",
    component: () => import('../components/Layout.vue'),
    children: [
      {
        path: "profile",
        component: () => import('../views/profile.vue'),
      }
    ],
    meta: {
      title: "我的",
      icon: require('../assets/profile.png'),
      iconSel: require('../assets/profile(1).png'),
    },
  },
]

const router = new VueRouter({
  routes
})

export default router
